<script type="text/javascript">
    var searchUrl = "<?php echo site_url("social/search/"); ?>";
</script>
<div>
    <?php
    $attributes = array('id' => 'frm_search');
    echo form_open('', $attributes);
    ?>

    <input title="search for a friend" class="search" type="text" style="width:300px; "  name="search">
    <input type="submit" value="ok" class="blueButton" id="users_search"/>
    <?php echo form_close(); ?>
</div>
<div id="chatUsers" class="rounded">
    <?php
    foreach ($users as $u) {
        if ($u->id != $user->id) {
            ?>
            <div class="divUser" id="divUser<?php echo $u->id; ?>" onclick="loadChatWith('<?php echo $u->id; ?>');">
                <div class="notSelected">
                    <img src="<?php echo css_url("chat/with") . "../pht/" . $u->tof; ?>"  />
                </div>
                <div class="notSelected">
                    <p><?php echo $u->firstname . " " . $u->lastname; ?></p>
                    <p><?php echo $u->city->name . ", " . $u->country->name; ?></p>
                    <p><?php echo $u->birthday; ?></p>
                    <span id="ntf<?php echo $u->id ?>"><?php echo $u->notifsForMe == 0 ? "" : $u->notifsForMe; ?></span>
                    <p><?php echo $u->statut; ?></p>
                </div>
                <div class="clear"></div>
            </div>
            <?php
        }
    }
    ?>
</div>
<script>
    $("#users_search").click(function() {
        search("frm_search");
        return false;
    });
</script>